package net.linlan.plat.comm.websocket;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * In order to deal with code questions create class to config webapp
 * Filename:WebAppConfig.java
 * Desc: WebApp config to deal with code questions
 * WebSocket节点配置类
 *
 * @version 1.0
 * @since 1.0
 *
 */
@Configuration
public class WebSocketStompConfig {
    //这个bean的注册,用于扫描带有@ServerEndpoint的注解成为websocket  ,如果你使用外置的tomcat就不需要该配置文件
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }
}
